<style type="text/css">
div.form label {display: inline;}
</style>
<h2>Assign Actions to Role</h2>
<div class="form">
    <div class="row">
        <?php echo CHtml::dropDownList('roles', $role, $roles);?>
    </div>
    <div class="row">
        <?php //echo CHtml::checkBoxList('actions', $grantedActions, $actions, array('options'=>$inheritSelected));?>
        <?php if (count($actions)):?>
        <?php foreach ($actions as $action => $name):?>
            <div>
            <?php echo CHtml::checkBox('actions[]', in_array($action, $grantedActions), (in_array($action, $inheritSelected) ? array('value'=>$action, 'id'=>$action, 'disabled'=>'disabled') : array('value'=>$action, 'id'=>$action)));?>
            <?php echo CHtml::label($name, $action);?>
            </div>
        <?php endforeach;?>
        <?php endif;?>
    </div>
    <div class="buttons">
        <?php echo CHtml::button('Save', array('class'=>'save'));?>
        <?php echo CHtml::link('Reset', '#', array('class'=>'reset'));?>
    </div>
</div>